package io.afu.imagehelper.exceptions;


import io.afu.imagehelper.enums.ExceptionEnum;

/**
 * @author RffanLAB.方露宇
 * @version 0.1
 */
public class ImageHelperException extends Exception {

    private static final long serialVersionUID = 232342341341L;

    private Integer code;

    public ImageHelperException(){
        super();
    }

    public ImageHelperException(String message){
        super(message);
    }

    public ImageHelperException(String message, Integer code){
        super(message);
        this.code = code;
    }

    public ImageHelperException(ExceptionEnum constantEnum){
        super(constantEnum.getMsg());
        this.code = constantEnum.getCode();
    }

    public ImageHelperException(Throwable cause){
        super(cause);
    }


    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }


}
